package com.colors.springcloud.myhandler;

import com.alibaba.csp.sentinel.slots.block.BlockException;
import com.colors.springcloud.entities.CommonResult;
import com.colors.springcloud.entities.Payment;

/**
 * @author colors
 * @date 2021/1/14 10:41
 * 统一sentinel处理限流类
 */
public class CustomBlockHandler {

    public static CommonResult customHandlerException(BlockException exception) {
        return new CommonResult(400, "自定义处理方法1");
    }

    public static CommonResult customHandlerException2(BlockException exception) {
        return new CommonResult(400, "自定义处理方法2");
    }
}
